<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>目标伪类选择器</title>
  <style>
    div {
      background-color: gray;
      height: 300px;
    }
    div:target {
      background-color: orange;
    }
  </style>
</head>
<body>
  <a href="#first">去看第1个</a>
  <a href="#second">去看第2个</a>
  <a href="#third">去看第3个</a>
  <a href="#fourth">去看第4个</a>
  <a href="#fifth">去看第5个</a>
  <div id="first">第1个</div>
  <br>
  <div id="second">第2个</div>
  <br>
  <div id="third">第3个</div>
  <br>
  <div id="fourth">第4个</div>
  <br>
  <div id="fifth">第5个</div>
</body>
</html>